import request from '@/plugins/request';
// 角色列表
export function roleList(data) {
    return request({
      url: "/v1/rbac/role/list",
      method: "get",
      params: data,
    });
  }
  
  //角色新增
  export function createRole(data) {
    return request({
      url: "/v1/rbac/role/create",
      method: "post",
      data,
    });
  }
    //角色详情
    export function roleInfo(data) {
      return request({
        url: "/v1/rbac/role/info",
        method: "get",
        params: data,
      });
    }
  //角色编辑
  export function updateRole(data) {
    return request({
      url: "/v1/rbac/role/update",
      method: "post",
      data,
    });
  }
  //删除角色
  export function roleDel(data) {
    return request({
      url: "/v1/rbac/role/delete",
      method: "post",
      data,
    });
  }

  //角色权限列表
  export function permissionInfo(data) {
    return request({
      url: "/v1/rbac/role/permission",
      method: "get",
      params: data,
    });
  }

    //编辑角色权限
    export function updatePermission(data) {
      return request({
        url: "/v1/rbac/role/update-permission",
        method: "post",
        data,
      });
    }